<?php
require "../defines.php";
require "../model/class_Nav.php";
require "../model/class_Bin.php";

	$bin=new Bin();
	if ($_GET['buy']=1){
		$bin->into_bin($buyid);
	}
	$quant=$bin->get_quant();
	$i = $bin->filter($sort);
	///////Product output///////

	$all = $bin->get_all($get_id);
	
/////////////NAVIGATOR////////////
//max per page
define("PERPAGE", 10);
//check variable
if (!isset($get_off))
{
	$totaloffset=0;
}
else
{
	//clean variable here
	//then calc record offset
	$totaloffset = $get_off * PERPAGE;
}

$pagename = basename($_SERVER["PHP_SELF"]);
$totalcount = $bin->get_total_cat($cat);
$numpages = ceil($totalcount/PERPAGE);
$data = $bin->get($totaloffset, PERPAGE, $cat, $sort);
?>